package com.cyt.sys.model.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.cyt.sys.model.po.SysUser;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;


/**
 *@Author: YuShengQiang
 *@Date: 2018-11-16 11:05
 *@Description: 基础部分-用户
 */
@Getter
@Setter
@NoArgsConstructor
public class BaseUserDto implements Serializable {

    private String id;//主键

    @Excel(name = "用户姓名")
    private String name;//名称

    @Excel(name = "登录名称")
    private String loginName;//登录名称

    private String password;//登录密码

    private String headLogo;//头像

    @Excel(name = "最后登录时间")
    private Date lastLoginTime;//最后登录时间

    @Excel(name = "最后登录ip")
    private String ipAddress;//最后登录ip

    private String orgId;//组织id

    @Excel(name = "组织名称")
    private String orgName;//组织名称

    private String roleId;//角色id

    @Excel(name = "角色id")
    private String roleName;//角色名称

    @Excel(name = "有效状态",replace = { "正常_1", "禁用_2" })
    private String status;//有效状态

    @Excel(name = "排序")
    private String sort;// 排序

    @Excel(name = "删除标识",replace = { "正常_1", "已删除_2" })
    private String removeTag;// 删除标识：1、正常，2、已删除

    private String token;// token

    @Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;//创建时间


    public BaseUserDto(SysUser sysUser) {
        this.id = sysUser.getId();
        this.name = sysUser.getName();
        this.loginName = sysUser.getLoginName();
        this.headLogo = sysUser.getHeadLogo();
        this.token = sysUser.getToken();
    }
}